# Maintainer: Filipe Laíns (FFY00) <lains@archlinux.org>

_pkgname=python-multipart
pkgname=python-$_pkgname
pkgver=0.0.6
pkgrel=2
pkgdesc='streaming multipart parser for Python'
arch=('any')
url='https://github.com/andrew-d/python-multipart'
license=('Apache')
depends=('python' 'python-six')
makedepends=('python-build' 'python-installer' 'python-hatchling')
checkdepends=('python-pytest-runner' 'python-yaml')
source=("$pkgname-$pkgver.tar.gz::$url/archive/$pkgver.tar.gz")
sha512sums=('fb996725266996aefb5284b4815ecd8d0005344359f29780f0c2817125f625f3910be14d7d937e975b3ca9fb27a2a483401ab342a0c861df0e1112d447b1f083')

build() {
  cd $_pkgname-$pkgver

  python -m build --wheel --no-isolation
}

check() {
  cd $_pkgname-$pkgver

  pytest -v
}

package() {
  cd $_pkgname-$pkgver

  python -m installer --destdir="$pkgdir" dist/*.whl

  install -Dm 644 LICENSE.txt "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
}

# vim:set ts=2 sw=2 et:
